package com.myidis.response;

import com.myidis.entity.Department;
import com.myidis.entity.RightRole;
import com.myidis.entity.User;

public class UserRes {
	private int id;
	private String userName;
	private String name;
	private int deptId;
	private String dept;
	private int roleId;
	private String role;
	private String post;
	private String email;
	private String phone;
	
	public UserRes(User user, Department dept, RightRole role) {
		this.id = user.getId();
		this.userName = user.getUserName();
		this.name = user.getName();
		this.deptId = dept == null? null: dept.getId();
		this.dept = dept == null? "无": dept.getName();
		this.roleId = role == null? null: role.getId();
		this.role = role == null? "无": role.getName();
		this.post = user.getPost();
		this.email = user.getEmail();
		this.phone = user.getPhone();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getDeptId() {
		return deptId;
	}

	public void setDeptId(int deptId) {
		this.deptId = deptId;
	}

	public String getDept() {
		return dept;
	}

	public void setDept(String dept) {
		this.dept = dept;
	}

	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public String getPost() {
		return post;
	}

	public void setPost(String post) {
		this.post = post;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
}
